package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"pers/api/internal/config"
	"pers/persrpc/persrpcclient"
)

type ServiceContext struct {
	Config  config.Config
	PersRpc persrpcclient.Persrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		PersRpc: persrpcclient.NewPersrpc(zrpc.MustNewClient(c.PersRpc)),
	}
}
